﻿using PetaPoco;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace Qy.Models
{
    [TableName("qy_admin_post")]
    [PrimaryKey("Id", AutoIncrement = true)]
    public class UserPost
    {
        public int Id { get; set; }
        public string PostName { get; set; }
        public string PostCode { get; set; }
        public int Sort { get; set; }
        public string Remark { get; set; }

    }

    public class EditUserPost
    {
        public int Id { get; set; }

        [Display(Name = "岗位名称")]
        public string PostName { get; set; }
        [Display(Name = "岗位代码")]
        public string PostCode { get; set; }
        [Required(ErrorMessage = "请输入{0}")]
        [Display(Name = "岗位排序")]
        [RegularExpression(RegxPatterns.Number, ErrorMessage = "{0}必须为数字")]
        public int Sort { get; set; }
        [Display(Name = "备注")]
        public string Remark { get; set; }

    }


}
